package api

import (
	"git.supremind.info/product/box/vehicle/internal/dao"
	"git.supremind.info/product/box/vehicle/internal/dto"
	"github.com/gin-gonic/gin"
	"net/http"
)

type VehicleModelChemicalApi struct{}

func NewVehicleModelChemicalApi() VehicleModelChemicalApi {
	return VehicleModelChemicalApi{}
}

func (u VehicleModelChemicalApi) Get(c *gin.Context) {

}

func (u VehicleModelChemicalApi) List(c *gin.Context) {
	res := dao.Init("./gee.db")
	configs, _ := res.Get(c)
	result := dto.Result{
		Code:    http.StatusOK,
		Message: "请求成功",
		Data: gin.H{
			"configs": configs,
		},
	}
	c.JSON(http.StatusOK, result)
}

func (u VehicleModelChemicalApi) Create(c *gin.Context) {
	dto := dao.Init("./gee.db")
	dto.Set(c)
}

func (u VehicleModelChemicalApi) Update(c *gin.Context) {

}
func (u VehicleModelChemicalApi) Delete(c *gin.Context) {

}
